/**
 * 
 */
package com.exception;

/**
 * @author caiban
 *
 */
public class ServiceException extends Exception {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	public String code;
	public Object[] args;
	static final public String CODE_SUCCESS="000";
	static final public String CODE_ERROR="0001";
	public ServiceException(){
		super();
	}
	
	public ServiceException(String msg){
		super(msg);
		this.code = CODE_ERROR;
	}
	
	public ServiceException(String msg,Object... args){
		super(msg);
		this.code = CODE_ERROR;
		this.args = args;
	}
	
	public ServiceException setCode(String code)
	{
		this.code= code;
		return this;
	}
	
	public ServiceException(String msg, Throwable cause){
		super(msg, cause);
	}

}
